#include <chrono>
#include <filesystem>
#include <iostream>
using namespace std;
/// 获取文件的创建时间的时间戳
int main() {
    std::string s = "/home/yezongwen";
    std::error_code err{};
    auto lastFileTimeType = std::filesystem::last_write_time(s, err);
    // Convert file time to system clock time point
    auto tp = std::chrono::time_point_cast<std::chrono::system_clock::duration>(
            lastFileTimeType - std::filesystem::file_time_type::clock::now() +
            std::chrono::system_clock::now());

    std::time_t lastTime = std::chrono::system_clock::to_time_t(tp);

    long long now = std::chrono::duration_cast<std::chrono::seconds>(
            std::chrono::system_clock::now().time_since_epoch())
            .count();

    long long dd = std::time(nullptr);
    std::cout << dd << std::endl;
    std::cout << "你好，" << std::endl;
    return 0;
}


